Linear model conditional on random effects : is an design matrix.
Distribution of : is an design matrix, is positive definite.
More precisely, there can be several random effects terms , , and for each contains a regressors within groups. The coefficients for the regressors within each group have a
covariance across groups. I.e.
The example data
Load sleepstudy and restrict to 3 days and 3 subjects:
Model, variables are (Intercept) and Days, both fixed and random:
model <-lmer(Reaction ~ Days + (Days | Subject), data)summary(model)
Linear mixed model fit by REML ['lmerMod']
Formula: Reaction ~ Days + (Days | Subject)
Data: data
REML criterion at convergence: 65.6
Scaled residuals:
Min 1Q Median 3Q Max
-1.3294 -0.3361 -0.0463 0.5375 0.9859
Random effects:
Groups Name Variance Std.Dev. Corr
Subject (Intercept) 808.5 28.43
Days 122.8 11.08 -0.56
Residual 140.0 11.83
Number of obs: 9, groups: Subject, 3
Fixed effects:
Estimate Std. Error t value
(Intercept) 221.403 17.561 12.607
Days 2.792 8.016 0.348
Correlation of Fixed Effects:
(Intr)
Days -0.585
We now try to extract the parts of the model in the equation above (constants and estimates).